/* Gap Laws Screener — Neo Dark AI Theme */

:root {
  --bg: #020617;
  --bg-soft: #020617;
  --panel: rgba(15, 23, 42, 0.96);
  --panel-2: rgba(15, 23, 42, 0.88);

  --text: #e5f2ff;
  --muted: #94a3b8;

  --brand: #38bdf8;
  --accent: #22d3ee;
  --accent-soft: rgba(56, 189, 248, 0.22);
  --accent-strong: #06b6d4;

  --danger: #fb7185;
  --success: #22c55e;

  --radius: 18px;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.9);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.25), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(129, 140, 248, 0.32), transparent 55%),
    radial-gradient(circle at 50% 120%, rgba(15, 23, 42, 1), #020617 60%);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Arial,
    sans-serif;
}

/* ───────────────── HEADER / TOPBAR ───────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
padding: 4px 6px;
  margin: 0 auto;
  max-width: 1200px;

  background:
    radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.22), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(37, 99, 235, 0.16), transparent 55%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.9));

  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow:
    0 22px 60px rgba(15, 23, 42, 0.95),
    0 0 0 1px rgba(15, 23, 42, 0.9);
  border-radius: 0 0 22px 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
padding: 2px 4px;
  border-radius: 999px;

  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;

  background:
    linear-gradient(120deg, rgba(56, 189, 248, 0.4), rgba(56, 189, 248, 0.1)),
    radial-gradient(circle at 0 0, rgba(15, 23, 42, 1), transparent 60%);
  border: 1px solid rgba(148, 163, 184, 0.7);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.4);
}

.brand span {
  color: var(--accent-strong);
}

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tab {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(15, 23, 42, 0.96);
  color: var(--text);
padding: 2px 4px;
  border-radius: 999px;
  cursor: pointer;

  font-weight: 600;
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;

  transition:
    background 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    transform 0.12s ease;
}

.tab[aria-selected="true"] {
  background:
    linear-gradient(120deg, rgba(56, 189, 248, 0.32), rgba(79, 70, 229, 0.4));
  border-color: rgba(56, 189, 248, 0.9);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.75);
  transform: translateY(-1px);
}

.tab:hover {
  border-color: rgba(148, 163, 184, 0.9);
}

/* ───────────────── LAYOUT ───────────────── */

.app {
  max-width: 1200px;
  margin: 24px auto 0;
  padding: 0 18px 32px;
}

.view[hidden] {
  display: none;
}

h1 {
  margin: 0 0 12px;
  font-size: 24px;
  letter-spacing: 0.04em;
}

/* ───────────────── CARDS / PANELS ───────────────── */

.cards {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 16px 0;
}

.card {
  position: relative;
  background:
    radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.15), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(37, 99, 235, 0.21), transparent 60%),
    var(--panel);
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.2), transparent 55%);
  opacity: 0.0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  border-color: rgba(56, 189, 248, 0.85);
  box-shadow:
    0 20px 50px rgba(15, 23, 42, 0.95),
    0 0 0 1px rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}

.placeholder {
  min-height: 140px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed rgba(148, 163, 184, 0.5);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.86);
}

/* универсальная кнопка */

.btn {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;

  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);

  background:
    linear-gradient(120deg, rgba(56, 189, 248, 0.4), rgba(79, 70, 229, 0.6));
  color: var(--text);
  text-decoration: none;

  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;

  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.9);
  cursor: pointer;
  transition:
    transform 0.14s ease,
    box-shadow 0.14s ease,
    filter 0.14s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.9);
}

/* ───────────────── PANELS / FOOTER ───────────────── */

.panel.controls {
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 14px;
  padding: 10px 12px;
  margin: 8px 0 12px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.9);
}

.footer {
  max-width: 1200px;
  margin: 8px auto 24px;
  padding: 0 18px 24px;

  display: flex;
  justify-content: space-between;
  gap: 8px;

  color: var(--muted);
  font-size: 12px;
  opacity: 0.85;
}

/* ───────────────── SCROLLBAR ───────────────── */

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.9) rgba(15, 23, 42, 0.98);
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.98);
}

*::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.92);
  border-radius: 999px;
}
/* === [THEME OVERRIDE] Behance-like AI Crypto 2025-11-13 === */
:root{
  --bg:#020518;
  --panel:#060b23;
  --panel-2:#0b1230;
  --text:#f9fbff;
  --muted:#9ca3c4;

  --accent:#14f4ff;
  --accent-soft:rgba(20,244,255,.15);
  --accent-strong:#22d3ee;
  --accent-alt:#a855f7;

  --profit:#22c55e;
  --loss:#fb7185;

  --radius:18px;
  --shadow:0 20px 60px rgba(2,6,23,.95);
}

body{
  background:
    radial-gradient(circle at 0% 0%, rgba(20,244,255,.24), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(168,85,247,.28), transparent 55%),
    #020518;
  color:var(--text);
}

/* TOPBAR & TABS */

.topbar{
  background:
    radial-gradient(circle at 0 0, rgba(20,244,255,.18), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(56,189,248,.18), transparent 60%),
    linear-gradient(180deg, rgba(6,11,35,.96), rgba(6,11,35,.9));
  border-bottom:1px solid rgba(148,163,184,.5);
  box-shadow:
    0 20px 60px rgba(2,6,23,.95),
    0 0 0 1px rgba(15,23,42,.9);
  backdrop-filter:blur(22px);
}

.brand{
  background:
    linear-gradient(120deg, rgba(20,244,255,.22), rgba(168,85,247,.18)),
    radial-gradient(circle at 0 0, rgba(2,6,23,1), transparent 65%);
  border-radius:999px;
  border:1px solid rgba(148,163,184,.8);
  box-shadow:0 0 36px rgba(20,244,255,.55);
  letter-spacing: 0.13em;
  text-transform:uppercase;
  font-weight:700;
  font-size:11px;
}

.brand span{
  color:var(--accent-strong);
}

.tabs{
  flex-wrap:wrap;
}

.tab{
  border-radius:999px;
  border:1px solid rgba(148,163,184,.6);
  background:rgba(6,11,35,.96);
  color:var(--text);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform:uppercase;
  padding: 3px 6px;
}

.tab[aria-selected="true"]{
  background:linear-gradient(120deg,#14f4ff,#3b82f6,#a855f7);
  border-color:rgba(20,244,255,.9);
  box-shadow:
    0 12px 32px rgba(37,99,235,.9),
    0 0 0 1px rgba(15,23,42,.9);
}

/* CARDS */

.card{
  background:
    radial-gradient(circle at 0 0, rgba(20,244,255,.16), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(168,85,247,.18), transparent 60%),
    rgba(6,11,35,.96);
  border-radius:18px;
  border:1px solid rgba(148,163,184,.55);
  box-shadow:0 22px 60px rgba(2,6,23,.96);
  position:relative;
  overflow:hidden;
}

.card::before{
  content:"";
  position:absolute;
  inset:-40%;
  background:radial-gradient(circle at 0 0, rgba(20,244,255,.22), transparent 60%);
  opacity:0;
  transition:opacity .18s ease;
  pointer-events:none;
}

.card:hover{
  border-color:rgba(20,244,255,.9);
  box-shadow:
    0 26px 70px rgba(2,6,23,.98),
    0 0 0 1px rgba(20,244,255,.4);
}

.card:hover::before{
  opacity:1;
}

/* BUTTONS */

.btn{
  border-radius:999px;
  border:1px solid rgba(148,163,184,.8);
  background:linear-gradient(120deg,#14f4ff,#3b82f6,#a855f7);
  box-shadow:
    0 18px 48px rgba(37,99,235,.95),
    0 0 40px rgba(20,244,255,.55);
  font-size:11px;
  letter-spacing:.14em;
  text-transform:uppercase;
}

/* CONTROLS PANEL */

.panel.controls{
  background:rgba(6,11,35,.94);
  border-radius:18px;
  border:1px solid rgba(148,163,184,.5);
  box-shadow:0 18px 45px rgba(2,6,23,.95);
}

/* FOOTER */

.footer{
  color:var(--muted);
  font-size:12px;
  opacity:.85;
}

/* CHART CONTROLS & AREA */

.chart-controls{
  background:
    radial-gradient(circle at 0 0, rgba(20,244,255,.18), transparent 60%),
    rgba(6,11,35,.96);
  border-radius:18px;
  border:1px solid rgba(148,163,184,.6);
  box-shadow:0 18px 45px rgba(2,6,23,.96);
  padding:10px 12px;
}

.chart-select,
.chart-input{
  min-width:120px;
  background:rgba(6,11,35,.98);
  border:1px solid rgba(148,163,184,.75);
  color:#f9fbff;
  border-radius:999px;
  padding:6px 12px;
  font-size:13px;
  font-family:inherit;
}

.chart-select::placeholder,
.chart-input::placeholder{
  color:#9ca3c4;
}

.chart-select:focus,
.chart-input:focus{
  border-color:#14f4ff;
  box-shadow:
    0 0 0 1px rgba(20,244,255,.7),
    0 0 0 10px rgba(20,244,255,.08);
  outline:none;
}

.chart-area{
  height:420px;
  border-radius:22px;
  border:1px solid rgba(148,163,184,.55);
  background:
    radial-gradient(circle at 0 0, rgba(59,130,246,.35), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(20,244,255,.35), transparent 60%),
    #020518;
  box-shadow:0 24px 70px rgba(2,6,23,.97);
  display:grid;
  place-items:center;
  color:#9ca3c4;
}

/* METRICS TABLE */

.metrics-table{
  width:100%;
  border-collapse:collapse;
  font-variant-numeric:tabular-nums;
  background:
    radial-gradient(circle at 0 0, rgba(20,244,255,.14), transparent 60%),
    rgba(6,11,35,.96);
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 20px 55px rgba(2,6,23,.96);
}

.metrics-table th,
.metrics-table td{
  border-bottom:1px solid rgba(148,163,184,.35);
  padding:7px 10px;
  font-size:13px;
}

.metrics-table th{
  text-align:left;
  text-transform:uppercase;
  letter-spacing:.12em;
  font-size:11px;
  color:#9ca3c4;
  background:rgba(6,11,35,.98);
}

.metrics-table tbody tr:nth-child(2n){
  background:rgba(6,11,35,.9);
}

.metrics-table tbody tr:nth-child(2n+1){
  background:rgba(6,11,35,.86);
}

.metrics-table tbody tr:hover{
  background:rgba(6,11,35,.98);
  box-shadow:inset 0 0 0 1px rgba(20,244,255,.45);
}

.metrics-head{
  display:flex;
  gap:8px;
  align-items:center;
  margin:10px 0 6px;
  color:#f9fbff;
  font-size:14px;
}

.metrics-pill{
  background:rgba(20,244,255,.16);
  border:1px solid rgba(148,163,184,.8);
  border-radius:999px;
  padding:4px 10px;
  font-size:11px;
  font-weight:600;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#f9fbff;
}

/* QUANT CARDS */

.quant-grid{
  display:grid;
  gap:14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.quant-card{
  position:relative;
  background:
    radial-gradient(circle at 0 0, rgba(20,244,255,.18), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(168,85,247,.2), transparent 60%),
    #060b23;
  border-radius:16px;
  border:1px solid rgba(148,163,184,.7);
  padding:12px;
  box-shadow:0 22px 60px rgba(2,6,23,.96);
  overflow:hidden;
}

.quant-card::before{
  content:"";
  position:absolute;
  inset:-35%;
  background:radial-gradient(circle at 0 0, rgba(20,244,255,.24), transparent 60%);
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
}

.quant-card:hover{
  transform:translateY(-1px);
  border-color:rgba(20,244,255,.9);
  box-shadow:
    0 26px 70px rgba(2,6,23,.98),
    0 0 0 1px rgba(20,244,255,.4);
}

.quant-card:hover::before{
  opacity:1;
}

.quant-kv{
  display:flex;
  justify-content:space-between;
  font-variant-numeric:tabular-nums;
  color:#9ca3c4;
  font-size:13px;
  padding:2px 0;
}

.quant-kv strong{
  color:#f9fbff;
}

/* ==============================================================
   DARK NEON THEME  —  2025-11-13
   Основа под единый вид скринера/дашборда
   ============================================================== */

:root {
  /* Фоны */
  --bg-body:        #020813;
  --bg-section:     #041321;
  --bg-card:        #071C2C;
  --bg-card-soft:   #071A28;
  --bg-input:       #071A28;
  --bg-input-focus: #0A2234;

  /* Бордеры */
  --border-subtle:  #0B2535;
  --border-strong:  #1E3A5F;
  --border-focus:   #2D8CFF;

  /* Текст */
  --text-main:      #F9FAFB;
  --text-muted:     #9CA3AF;
  --text-dim:       #6B7280;

  /* Акценты */
  --accent-main:    #22F7A5;  /* главный неон (CTA, ключевые метрики) */
  --accent-blue:    #2D8CFF;  /* вторичный акцент (линки, ховер) */

  /* Статусы */
  --success:        #22C55E;
  --danger:         #F97373;
}

/* БАЗА СТРАНИЦЫ */

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left,  #1A936F33, transparent),
    radial-gradient(circle at bottom right, #2563EB33, transparent),
    var(--bg-body);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

.page,
.wrapper,
.app-root {
  min-height: 100vh;
  background: transparent;
}

/* ТОПБАР / НАВИГАЦИЯ */

.topbar,
.header,
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 11px;
  padding: 11px 22px;
  background-color: rgba(2, 8, 19, 0.96);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 40;
}

.brand,
.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 14px;
}

.brand span,
.logo span {
  color: var(--accent-main);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 10px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--accent-main);
}

/* ОСНОВНОЙ КОНТЕЙНЕР */

.main,
.content {
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px 24px 40px;
}

/* ГРИД КАРТОЧЕК И ПАНЕЛЕЙ */

.grid-3,
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

/* КАРТОЧКИ */

.card,
.panel,
.metrics-card {
  background: linear-gradient(135deg, var(--bg-section), var(--bg-card));
  border-radius: 20px;
  border: 1px solid rgba(11, 37, 53, 0.9);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.7);
  padding: 16px 18px;
}

.card.soft,
.panel.soft {
  background: var(--bg-card-soft);
}

.card-header,
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.card-title,
.panel-title {
  font-size: 16px;
  font-weight: 600;
}

.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

/* ТЕКСТ */

h1, h2, h3, h4 {
  margin: 0 0 8px;
  font-weight: 700;
}

h1 {
  font-size: 40px;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 28px;
}

p {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text-muted);
}

/* КНОПКИ */

.btn,
button,
input[type="button"],
input[type="submit"] {
  font-family: inherit;
  font-size: 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 8px 18px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}

.btn-primary {
  background: var(--accent-main);
  color: #020813;
  font-weight: 600;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(34, 247, 165, 0.4);
}

.btn-secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-main);
}

.btn-secondary:hover {
  border-color: var(--accent-blue);
}

/* ФИЛЬТРЫ, ИНПУТЫ, СЕЛЕКТЫ */

.filter-bar,
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.field,
.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field label,
.form-field label {
  font-size: 11px;
  color: var(--text-dim);
}

input[type="text"],
input[type="number"],
select {
  min-width: 120px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-input);
  color: var(--text-main);
  font-size: 13px;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
  outline: none;
  border-color: var(--border-focus);
  background-color: var(--bg-input-focus);
}

/* БЕЙДЖИ / ТЕГИ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background-color: rgba(148, 163, 184, 0.18);
  color: var(--text-main);
}

.badge-up,
.badge-success {
  background-color: rgba(34, 197, 94, 0.16);
  color: var(--success);
}

.badge-down,
.badge-danger {
  background-color: rgba(248, 113, 113, 0.16);
  color: var(--danger);
}

/* ТАБЛИЦЫ (СКРИНЕР) */

.table-wrapper {
  border-radius: 18px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card-soft);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead {
  background: rgba(4, 19, 33, 0.9);
}

thead th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 500;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-subtle);
}

tbody tr:nth-child(even) {
  background-color: rgba(7, 28, 44, 0.7);
}

tbody tr:nth-child(odd) {
  background-color: rgba(4, 19, 33, 0.9);
}

tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(11, 37, 53, 0.6);
}

tbody tr:hover {
  background-color: rgba(10, 34, 52, 0.9);
}

/* ЦИФРЫ ПРОЦЕНТОВ */

.text-pos,
.value-up {
  color: var(--success);
}

.text-neg,
.value-down {
  color: var(--danger);
}

/* МИНИ-ГРАФИКИ ВНУТРИ КАРТОЧЕК (СПАРКЛАЙНЫ) */

.sparkline {
  width: 100%;
  height: 60px;
}

.sparkline canvas,
.sparkline svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* АДАПТИВ */

@media (max-width: 768px) {
  .topbar,
  .header,
  .navbar {
    padding: 8px 11px;
  }

  .main,
  .content {
    padding: 16px 12px 32px;
  }

  h1 {
    font-size: 32px;
  }
}


/* Metrics: счётчик строк внизу справа */
.metrics-holder {
  position: relative;
  padding-bottom: 20px;
}

.metrics-head-stat {
  position: absolute;
  right: 0;
  bottom: 0;
  font-size: 11px;
  color: var(--text-muted);
}
/* Chart fullscreen mode */
#view-chart:fullscreen,
#view-chart:-webkit-full-screen {
  margin: 0;
  max-width: none;
  width: 100vw;
  height: 100vh;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* Заголовок и панель в полноэкранном режиме */
#view-chart:fullscreen > h1,
#view-chart:-webkit-full-screen > h1 {
  padding: 16px 24px 8px;
}

#view-chart:fullscreen #chart-controls,
#view-chart:-webkit-full-screen #chart-controls {
  padding: 12px 24px 16px;
}

/* Контейнер графика тянется на всё оставшееся место */
#view-chart:fullscreen .chart-area,
#view-chart:-webkit-full-screen .chart-area {
  flex: 1 1 auto;
  height: auto;
}


/* Скрываем заголовки подлистов Metrics/Chart/Quant */
#view-metrics > h1,
#view-chart > h1,
#view-quant > h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* Временное скрытие вкладки Quant */
#tab-quant {
  display: none !important;
}


/* Контейнер логотипа и тега */
.brand-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.brand-wrap .brand {
  order: 0;
}

.brand-wrap .brand-tag {
  order: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
  padding: 0;
  padding-left: 3ch;
  line-height: 1.1;
  font-weight: 100;
  opacity: 0.85;
  font-size: 7px;
  letter-spacing: 0.14em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
/* Market switch (Spot/USDT-M/COIN-M) */

.brand-wrap .brand-exchange{
  opacity: 0.9;
}

.market-switch{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.market-btn{
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(6, 11, 35, 0.96);
  color: #f9fbff;
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  line-height: 1.2;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.market-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.85);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.65);
}

.market-btn[aria-pressed="true"]{
  background: linear-gradient(120deg, #14f4ff, #3b82f6, #a855f7);
  border-color: rgba(20, 244, 255, 0.9);
  box-shadow:
    0 12px 32px rgba(37, 99, 235, 0.75),
    0 0 0 1px rgba(15, 23, 42, 0.9);
}

.market-btn:focus-visible{
  outline: 2px solid rgba(20, 244, 255, 0.85);
  outline-offset: 2px;
}



/* Временное скрытие карточки Quant на главной */
#view-home .cards .card:nth-child(3) {
  display: none !important;
}


/* Временное скрытие подсказки на главной */
#view-home .lead {
  display: none !important;
}

/* Плавающая кнопка Telegram в правом нижнем углу */
.tg-float {
  opacity: 0.7;
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2aabee, #229ed9);
  box-shadow:
    0 12px 30px rgba(15, 23, 42, 0.75),
    0 0 0 1px rgba(15, 23, 42, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f9fafb;
  text-decoration: none;
  font-size: 26px;
  z-index: 9999;
  cursor: pointer;
  transition:
    transform 0.15s ease-out,
    box-shadow 0.15s ease-out,}

.tg-float:hover {
  transform: translateY(-2px);
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.85),
    0 0 0 1px rgba(56, 189, 248, 0.9);
}

.tg-float:active {
  transform: translateY(0);
  box-shadow:
    0 8px 20px rgba(15, 23, 42, 0.75),
    0 0 0 1px rgba(56, 189, 248, 0.8);
}

.tg-float-icon {
  line-height: 1;
}

/* На узких экранах слегка поднимаем кнопку,
   чтобы меньше перекрывала интерфейс */
@media (max-width: 640px) {
  .tg-float {
    right: 16px;
    bottom: 16px;
    width: 46px;
    height: 46px;
    font-size: 22px;
  }
}

/* Настройка размера и цвета иконки Telegram */
.tg-float-icon {
  width: 0.85em;   /* иконка чуть меньше, чем 1em */
  height: 0.85em;
  display: block;
}

.tg-float-icon path {
  fill: #ffffff;   /* белый самолётик */

  opacity: 0.65;}

/* Подсказка при наведении на кнопку Telegram */
.tg-float {
  position: fixed; /* уже есть, но ещё раз не навредит */
}

.tg-float::after {
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  content: attr(data-tooltip);
  position: absolute;
  padding: 4px 10px;
  font-size: 11px;
  line-height: 1.3;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.96);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.9);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.15s ease-out,
    transform 0.15s ease-out;
  z-index: 10000;
}

.tg-float:hover::after {
  opacity: 1;
  transform: translateY(-50%);
}

/* Override Telegram tooltip */
.tg-float::after {
  color: #ffffff;
  right: calc(100% + 10px);
}
.tg-float:hover::after {
  opacity: 1;
}


/* Home: блок контакта Telegram */
.home-contact {
  margin-top: 16px;
}

.home-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}

.home-contact-link:hover {
  color: #e5f2ff;
}

.home-contact-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.home-contact-icon path {
  fill: currentColor;
}

/* Home: увеличенный размер иконки и текста Telegram */
.home-contact-link {
  font-size: 16px;
}

.home-contact-icon {
  width: 24px;
  height: 24px;
}

/* Home: центрирование и отступ для блока Telegram */
.home-contact {
  margin-top: 32px;
  text-align: center;
}

.home-contact-link {
  justify-content: center;
}

/* Home: ещё крупнее иконка и текст Telegram */
.home-contact-link {
  font-size: 18px;
}

.home-contact-icon {
  width: 28px;
  height: 28px;
}

/* Home: центрирование и отступ для блока Telegram */
.home-contact {
  margin-top: 32px;
  text-align: center;
}

.home-contact-link {
  justify-content: center;
}
/* FIX: HEADER brand рамка — не растягивать (responsive) */
.topbar .brand-wrap{
  width: auto !important;
  max-width: max-content !important;
  min-width: 0 !important;
  flex: 0 0 auto !important;
  align-self: flex-start !important;
  justify-content: flex-start !important;
}

.topbar a.brand,
.topbar .brand{
  display: inline-flex !important;
  width: max-content !important;
  max-width: max-content !important;
  min-width: 0 !important;
  flex: 0 0 auto !important;
  justify-content: flex-start !important;
}

.topbar a.brand > *,
.topbar .brand > *{
  flex: 0 0 auto !important;
}

/* если рядом отдельный тег/лейбл (например Binance Spot) */
.topbar .brand-wrap .brand-tag,
.topbar .brand-wrap .tag{
  width: auto !important;
  max-width: max-content !important;
  min-width: 0 !important;
  flex: 0 0 auto !important;
}

/* TOPBAR COMPACT OVERRIDE (AUTO) */
.topbar { padding: 3px 5px !important; }

/* бренд */
/* BRAND FONT OVERRIDE (AUTO) */
.topbar a.brand,
.topbar .brand,
.topbar a.brand span,
.topbar .brand span{
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
}

.topbar a.brand,
.topbar .brand {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
.topbar a.brand,
.topbar .brand { padding: 1px 3px !important; }

/* вкладки */
.tab { padding: 2px 3px !important; }


/* TABS NO BORDER (AUTO) */
.topbar .tab,
.tabs .tab,
.tab{
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}

.topbar .tab:hover,
.tabs .tab:hover,
.tab:hover{
  border: 0 !important;
  box-shadow: none !important;
}

.topbar .tab[aria-selected="true"],
.tabs .tab[aria-selected="true"],
.tab[aria-selected="true"]{
  border: 0 !important;
  box-shadow: none !important;
}

/* твой второй ряд (Spot/Futures) — тоже чуть ужать по высоте */
.brand-wrap { gap: 1px !important; }

/* TAG FONT OVERRIDE (AUTO) */
.topbar .brand-wrap .brand-tag{
  margin-top: 1px !important;
  font-size: 6px !important;
  font-weight: 300 !important;
  letter-spacing: 0.08em !important;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
}


/* UI: hide COIN-M button */
#market-coinm{display:none !important;}

/* Chart fullscreen: не подтягивать фильтры вверх (иначе режется рамка) */
#view-chart:fullscreen #chart-controls.chart-controls,
#view-chart:-webkit-full-screen #chart-controls.chart-controls{
  margin: 0 0 10px !important;
}


/* FIX: keep "Ещё историю" pinned bottom-left (no jump on zoom / responsive) */
.chart-overlay-controls #chart-more{
  left: 14px !important;
  bottom: 66px !important;
  top: auto !important;
}

@media (max-width: 768px){
  .chart-overlay-controls #chart-more{
    left: 14px !important;
    bottom: 66px !important;
    top: auto !important;
  }
}

